package day1113_2;

import java.io.File;
import java.io.IOException;

public class F2 {
    public static void main(String[] args) throws IOException {
        File  f1=new File("D:\\1113.txt");
        System.out.println( f1.length() );
        //查看1113.txt占用的字符数
        System.out.println(f1.lastModified());
        System.out.println(f1.getName());
        System.out.println(f1.getParent());
        System.out.println(f1.getPath());
        System.out.println(f1.exists());//true
        System.out.println(f1.isFile());//true
        System.out.println(f1.canRead());
        System.out.println(f1.canExecute());

        //-----------------------------------
        File   f2=new File("D:\\F2.txt");
        f2.createNewFile();
        f2.delete();

        File   f3=new File("D:\\");
        String[]  fs=f3.list();
    }
}
